package architecture;

//_ID_EX_Control_Buffer
public class _ID_EX_Control_Buffer{
	MyInt ALUSrc_EX;
	MyInt ALUOp_EX;
	MyInt memWrite_EX;
	MyInt memRead_EX;
	MyInt memToReg_EX;
	MyInt regWrite_EX;
	MyInt regDst_EX;
	
	MyInt ALUSrc_ID;
	MyInt ALUOp_ID;
	MyInt memWrite_ID;
	MyInt memRead_ID;
	MyInt memToReg_ID;
	MyInt regWrite_ID;
	MyInt regDst_ID;
	void clockEvent(){
		MyUtil.transfer(ALUSrc_ID, ALUSrc_EX);
		MyUtil.transfer(ALUOp_ID, ALUOp_EX);
		MyUtil.transfer(memWrite_ID, memWrite_EX);
		MyUtil.transfer(memRead_ID, memRead_EX);
		MyUtil.transfer(memToReg_ID, memToReg_EX);
		MyUtil.transfer(regWrite_ID, regWrite_EX);
		MyUtil.transfer(regDst_ID, regDst_EX);
	}
	void dump(){
		System.out.println("--------");
		System.out.println("_ID_EX_Control_Buffer:");
		System.out.println("ALUSrc_EX:"+ALUSrc_EX);
		System.out.println("ALUOp_EX:"+ALUOp_EX);
		System.out.println("memWrite_EX:"+memWrite_EX);
		System.out.println("memRead_EX:"+memRead_EX);
		System.out.println("memToReg_EX:"+memToReg_EX);
		System.out.println("regWrite_EX:"+regWrite_EX);
		System.out.println("regDst_EX:"+regDst_EX);
		
		System.out.println("ALUSrc_ID:"+ALUSrc_ID);
		System.out.println("ALUOp_ID:"+ALUOp_ID);
		System.out.println("memWrite_ID:"+memWrite_ID);
		System.out.println("memRead_ID:"+memRead_ID);
		System.out.println("memToReg_ID:"+memToReg_ID);
		System.out.println("regWrite_ID:"+regWrite_ID);
		System.out.println("regDst_ID:"+regDst_ID);
		System.out.println("--------");
	}
}